<?php

namespace app\api\validate;

use think\Validate;

class Comment extends Validate
{
    protected $rule = [
        'deal_id' => 'require|number',
        'pageNum' => 'number',
        'pageSize' => 'number',
        'comment' => 'require',
        'rate'      => 'require|between:1,5',
        'orderID'   => 'require|integer',
    ];

    protected $scene = [
        'index' => ['deal_id', 'pageNum', 'pageSize'],
        'add' => ['comment', 'rate', 'orderID'],
    ];
}
